<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>外带设备详情</title>
    <link rel="stylesheet" href="/asset/layui/css/layui.css">
    <link rel="stylesheet" href="/asset/css/index.css">
    <script src="/asset/layui/layui.js"></script>
    <link rel="Shortcut Icon" href="cachet.ico">
</head>
<body >
<div class="x-body">

       <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                <ul class="layui-tab-title">
                    <li class="layui-this">申请信息</li>
                    <li>设备列表</li>
                    <li>设备状况</li>
、                </ul>
                <div class="layui-tab-content">
                	<!--tb1-->
                    <div class="layui-tab-item layui-show">
                    	<div class="layui-form-item">
						    <div class="layui-inline">
						      <label class="layui-form-label">申请印章</label>
						      <div class="layui-input-inline layui-form-mid layui-word-aux">
						      	${apply.seal.sealName}
						      </div>
						    </div>
						    <div class="layui-inline">
						      <label class="layui-form-label">申请时间</label>
						      <div class="layui-input-inline layui-form-mid layui-word-aux">
						      	${apply.applyTime?string("yyyy-MM-dd HH:mm:ss")}
						      </div>
						    </div>
						</div>
						<div class="layui-form-item">
						    <div class="layui-inline">
						      <label class="layui-form-label">申请类型</label>
						      <div class="layui-input-inline layui-form-mid layui-word-aux">
						      	<@linkage type="APPLY_TYPE" key=apply.applyType>
					        		<span class="${linkage.style}">${linkage.name}</span>
					        	</@linkage>
						      </div>
						    </div>
						    <div class="layui-inline">
						      <label class="layui-form-label">申请状态</label>
						      <div class="layui-input-inline layui-form-mid layui-word-aux">
						      	
						      	<@linkage type="APPLY_STATUS" key=apply.applyStatus>
					        		<span class="${linkage.style}">${linkage.name}</span>
					        	</@linkage>
						      </div>
						    </div>
						</div>
						
						<div class="layui-form-item">
							<div class="layui-inline">
						      <label class="layui-form-label">申请人</label>
						      <div class="layui-input-inline layui-form-mid layui-word-aux">
						      	${apply.person.name}
						      </div>
						    </div>
						    <div class="layui-inline">
						      <label class="layui-form-label">申请周期</label>
						      <div class="layui-input-inline layui-form-mid layui-word-aux">
						      	${apply.takeStartTime?string("yyyy-MM-dd")} - ${apply.takeEndTime?string("yyyy-MM-dd")}
						      </div>
						    </div>
						</div>
						<div class="layui-form-item">
						    <div class="layui-inline">
						      <label class="layui-form-label">申请事由</label>
						      <div class="layui-input-inline layui-form-mid layui-word-aux">
						      	${apply.cause}
						      </div>
						    </div>
						</div>
						
						<div class="layui-form-item">
						    <div class="layui-inline">
						      <label class="layui-form-label">申请凭证</label>
						      <div class="layui-input-inline" style="width:600px">
							    <table class="layui-table">
							      <thead>
							          <tr>
								        <th>文件名</th>
								        <th>操作</th>
								      </tr>
							      </thead>
							      <tbody>
							      		<#if applyFiles?? && applyFiles?size gt 0>
							      		<#list applyFiles as item>
							      		<tr>
							      			<td>${item.fileName}</td>
							      			<td><a href="${item.fileUrl}">查看</td>
							      		</tr>
							      		</#list>
							      		<#else>
							      		<tr>
							      			<td colspan=2 style="text-align:center">暂无附件</td>
							      		</tr>
							      		</#if>
							      		
							      </tbody>
							    </table>
							    </div>
						    </div>
						</div>
                    
                    </div>
                    <!--tb1-->
                    <!--tb2-->
                    <div class="layui-tab-item">
                    
            			<div class="layui-form-item">
						    <div class="layui-inline">
						      <label class="layui-form-label">审核情况</label>
						      <div class="layui-input-block">
						      	<ul class="layui-timeline">
						      	
							      	  <li class="layui-timeline-item">
									    <i class="layui-icon layui-timeline-axis"></i>
									    <div class="layui-timeline-content layui-text">
									      <div class="layui-timeline-title">${apply.applyTime?string("yyyy-MM-dd HH:mm:ss")}，${apply.person.name}发启申请</div>
									    </div>
									  </li>
						      	
							      	 <#if apply.applyType=="TEST_APPLY" || apply.applyType=="URGENT_APPLY">
							      	  <li class="layui-timeline-item">
									    <i class="layui-icon layui-timeline-axis"></i>
									    <div class="layui-timeline-content layui-text">
									      <div class="layui-timeline-title">${apply.applyTime?string("yyyy-MM-dd HH:mm:ss")}，系统审核通过</div>
									    </div>
									  </li>
							      	 <#else>
								      	 <#list verifys as item>
										  <li class="layui-timeline-item">
										    <i class="layui-icon layui-timeline-axis"></i>
										    <div class="layui-timeline-content layui-text">
										      <div class="layui-timeline-title">
										      	${item.verifyTime?string("yyyy-MM-dd HH:mm:ss")}，${item.person.name} <#if item.verifyStatus=="PASSED">审核通过<#elseif item.verifyStatus=="REJECT">拒绝通过</#if>
										      </div>
										    </div>
										  </li>
										  </#list>
							      	 </#if>
								</ul>
						      </div>
						    </div>
						</div>
                    
                    </div>
                    <!--tb2-->
                    <!--tb3-->
                    <div class="layui-tab-item">
                    	<div class="layui-form-item">
							<div class="layui-inline">
						      <label class="layui-form-label">领取状态</label>
						      <div class="layui-input-inline layui-form-mid layui-word-aux">
						      		<@linkage type="TAKE_STATUS" key=devicesTake.takeStatus>
						        		<span class="${linkage.style}">${linkage.name}</span>
						        	</@linkage>
						      		
						      </div>
						    </div>
						</div>
                    	
                    	<#if devicesTake.takeStatus != "PENDING">
                    	<div class="layui-form-item">
							<div class="layui-inline">
						      <label class="layui-form-label">领取设备</label>
						      <div class="layui-input-inline layui-form-mid layui-word-aux">
						      		${devices.alias}
						      </div>
						    </div>
						    <div class="layui-inline">
						      <label class="layui-form-label">设备编号</label>
						      <div class="layui-input-inline layui-form-mid layui-word-aux">
						     		 ${devices.devicesCode}
						      </div>
						    </div>
						</div>
						<div class="layui-form-item">
							<div class="layui-inline">
						      <label class="layui-form-label">领取时间</label>
						      <div class="layui-input-inline layui-form-mid layui-word-aux">
						      		${devicesTake.takeTime?string("yyyy-MM-dd HH:mm:ss")}
						      </div>
						    </div>
						    <#if devicesTake.takeStatus=="RETURND">
						    <div class="layui-inline">
						      <label class="layui-form-label">归还时间</label>
						      <div class="layui-input-inline layui-form-mid layui-word-aux">
						      	${devicesTake.returnTime?string("yyyy-MM-dd HH:mm:ss")}
						      </div>
						    </div>
						    </#if>
						</div>
						</#if>
                    
                    
                    </div>
                    <!--tb3-->
				</div>
        </div>

</div>
<script>
layui.use(['element','laydate'], function(){
	  var $ = layui.jquery,element = layui.element,laydate = layui.laydate; 
	  element.on('tab(docDemoTabBrief)', function(elem){
	  		var id = $(this).attr('lay-id');
	  		if(id == 'SEAL_LIST'){
	  		 	location.href='/custos/list.htm';
	  		}
	  		if(id == 'DEVICES_LIST'){
	  		 	location.href='/custos/devicesList.htm';
	  		}
	  		if(id == 'APPLY_LIST'){
	  		 	location.href='/custos/applyList.htm';
	  		}
	  		if(id == 'USED_LIST'){
	  		 	location.href='/custos/usedList.htm';
	  		}
	  		
	  });
});
</script>
</body>
</html>